home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / Mesa-1.2.1 / GLUT / README-MESA
Encoding:
Text File  |  1995-07-05  |  3.0 KB  |  95 lines

  1.  
  2.  
  3.             Instructions for Using GLUT with Mesa
  4.  
  5.  
  6. Mark Kilgard's GLUT (OpenGL Utility Toolkit) is a nice OpenGL toolkit
  7. which allows one to write OpenGL applications without having to know
  8. anything about the window system and its interface to OpenGL.  It is
  9. much nicer than the aux and tk toolkits initially used by SGI and
  10. should be preferred over aux or tk when writing new programs.
  11.  
  12. At this time I'm not including GLUT with Mesa but may do so in the future.
  13. I have successfully compiled and tested GLUT with Mesa on an SGI workstation.
  14. I don't know what problems may pop up on other systems.
  15.  
  16. In any case, here's what you should do to use version 2.2 of GLUT with Mesa:
  17.  
  18.  
  19. 1. Ftp to sgigate.sgi.com and go to the pub/opengl/xjournal/GLUT directory.
  20.    Get the glut.2.2.tar.Z file.  Make sure your copy ends up in this dir-
  21.    ectory  (i.e. Mesa/GLUT/).
  22.  
  23. 2. Unpack the GLUT distribution file with:
  24.     zcat glut.2.2.tar.Z | tar xvf -
  25.  
  26. 3. Make a backup copy of Glut.cf in case you want the original:
  27.     cp Glut.cf Glut.cf.orig
  28.  
  29.  
  30. 4. If you're using a Sun with Solaris then define the following two
  31.    environment variables from your shell:
  32.  
  33.     OGLHOME    to where you've installed Mesa (maybe /usr/home/brian/Mesa)
  34.     OPENWINHOME to something like /usr/openwin
  35.  
  36.    Otherwise, edit Glut.cf as follows:
  37.  
  38.     change:        EXTRA_INCLUDES = -I$(TOP)
  39.     to look like:    EXTRA_INCLUDES = -I$(TOP)/../include -I$(TOP)
  40.  
  41.     change:        OPENGL = -lGL
  42.     to look like:    OPENGL = $(TOP)/../lib/libMesaGL.a
  43.  
  44.     change:        GLU = -lGLU
  45.     to look like:    GLU = $(TOP)/../lib/libMesaGLU.a
  46.  
  47.  
  48. 5. Run the mkmkfiles.imake script:
  49.     mkmkfiles.imake
  50.  
  51. 6. Run make:
  52.     make
  53.  
  54. 7. If all goes well there should be some executables in the progs/
  55.    directories for you to try out.
  56.  
  57. 8. You may want to copy the lib/glut/libglut.a file to wherever you have
  58.    your Mesa libraries (libMesaGL.a, libMesaGLU.a, etc) if you're going to
  59.    use it for your own work.
  60.  
  61.  
  62.  
  63. If something goes wrong during compilation, you're best off trying to
  64. diagnose and fix the problem yourself.  Send me the patches when you figure
  65. out the solution.
  66.  
  67. If you have run-time problems you can send me an email with a detailed
  68. description of the problem.  I'll see what I can do.
  69.  
  70. Don't bother Mark Kilgard with problems unless you're absolutely sure
  71. the problem is in the GLUT code.  I don't want him to be bothered by
  72. potential Mesa problems.
  73.  
  74.  
  75.  
  76. How GLUT works with Mesa
  77. ------------------------
  78.  
  79. GLUT makes calls to a number of GLX functions to bind OpenGL to X.  Mesa
  80. hasn't implemented any GLX functions until now.  Philip Brown at Berkeley
  81. implemented the initial pseudo-GLX functions and got GLUT to run with them.
  82. I rewrote much of Philip's GLX code to support more features, more reliably.
  83.  
  84. If you want to use the GLX functions in your programs be aware that:
  85.     1. they've not been fully tested
  86.     2. they are not as "tight" as the real GLX functions, i.e. what
  87.        works with Mesa's GLX functions might not work with the real
  88.        OpenGL/GLX interface.
  89.     3. a number of the functions are only stubs (not implemented)
  90.     4. read the glx.h file for more detailed info
  91.  
  92.  
  93. -Brian
  94.  
  95.